C (120/254)

From:Allan Odgaard
Date:06 Apr 00 at 02:00:37
Subject:Re: Please! Workbench and console...

On 06-Apr-00, Alexander Niven-Jenkins wrote:

> void main()
> {
> cout << "workbench" << endl;
> }

This is from StormAmiga.Guide:

The function "wbmain()" is part of "stormamiga.lib". It changes
to the actual directory and, if STORMAMIGA_NO_IO_WB is not
defined, redirects standard output "stdout" and standard input
"stdin" to a CLI window. The parameters of this window can be
defined in the variable "__stdiowin". The defaultvalue is "char
__stdiowin[] = "CON://///AUTO/CLOSE/WAIT"". If you write your
own "wbmain()", your function will be used and not the one from
"stormamiga.lib". [...]

However, I don't think ostream uses stdout, so that's probably why you can't
make it work. I haven't really worked with the stream classes of C++, so
someone else will have to tell you how to initialize these, or you could
probably also find your answer in a C++ book.

You might also consult the author of StormAmiga lib, as it could be viewed as a
bug, if his C++ startup code doesn't initialize these standard i/o streams...

Regards Allan

------------------------------------------------------------------------
Get a NextCard Visa, in 30 seconds!
1. Fill in the brief application
2. Receive approval decision within 30 seconds
3. Get rates as low as 2.9% Intro or 9.9% Fixed APR
Apply NOW!
http://click.egroups.com/1/975/1/_/451227/_/954983704/
------------------------------------------------------------------------